項目管理API
獲取項目信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object | Body | 是 | 命令參數 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| project_id | String | Body | 項目ID |
| project_name | String | Body | 項目名稱 |
| currency | String | Body | 貨幣 |
| visit_url | String | Body | 訪問地址 |
| address | Object<address> | Body | 地址 |
| room | Object<room> | Body | 房間信息 |
| device | Object<device> | Body | 設備信息 |
address說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| country | String | Body | 國家 |
| state_province | String | Body | 州/省份 |
| city | String | Body | 城市 |
| street | String | Body | 街道 |
| postcode | String | Body | 郵編 |
room說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| to_stay | Integer | Body | 待入住 |
| checked_out | Integer | Body | 已退房 |
| dirty | Integer | Body | 髒房間 |
| vacant_dirty | Integer | Body | 空髒房間 |
| occupied_dirty | Integer | Body | 住客髒房間 |
| vacant_clean | Integer | Body | 空乾淨房間 |
| occupied_clean | Integer | Body | 住客乾淨房間 |
| dnd | Integer | Body | 勿擾房間 |
| vacant_today | Integer | Body | 今日空房 |
| checked_in_today | Integer | Body | 今日入住 |
| number_of_staying_today | Integer | Body | 今日入住人數 |
| occupancy_rate_today | Integer | Body | 今日入住率 |
device說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| total | Integer | Body | 總數 |
| online | Integer | Body | 在線 |
| offline | Integer | Body | 離線 |
| low_power | Integer | Body | 低電量 |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_project_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"project_id": "p31adc223cc4b3bedb6bd4742dedcfa52",
"project_name": "test",
"currency": "USD:US Dollar",
"visit_url": "https://test.akubela.com/g",
"address": {
"country": "Austria",
"state_province": "Tirol",
"city": "Absam",
"street": "test",
"postcode": "0000001"
},
"room": {
"to_stay": 0,
"checked_out": 0,
"dirty": 0,
"vacant_dirty": 0,
"occupied_dirty": 0,
"vacant_clean": 0,
"occupied_clean": 0,
"dnd": 0,
"vacant_today": 0,
"checked_in_today": 0,
"number_of_staying_today": 0,
"occupancy_rate_today": 0
},
"device": {
"total": 0,
"online": 0,
"offline": 0,
"low_power": 0
}
}
}
失敗返回示例
見 接口失敗返回
更新項目信息
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令參數 |
param說明
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| currency | String | Body | 是 | 貨幣 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | Object | Body | 返回結果 |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_project_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"currency": "USD:US Dollar"
}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失敗返回示例
見 接口失敗返回
獲取貨幣列表
接口地址
POST /api/v1.0/invoke/open-ability/method/hotel-commands
請求參數
| 參數名 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 內容類型,值爲application/json |
| Accept | String | Header | 是 | 接受類型,值爲application/json |
| Authorization | String | Header | 是 | Bearer認證,訪問令牌 |
| command | String | Body | 是 | 命令名稱 |
| id | String | Body | 是 | 命令ID |
| param | Object | Body | 是 | 命令參數 |
返回參數
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| Content-Type | String | Header | 內容類型,值爲application/json |
| success | Boolean | Body | 判斷請求是否成功 true:成功 false:失敗 |
| timestamp | Integer | Body | 時間戳 |
| result | []Object<result> | Body | 返回結果 |
result說明
| 參數名 | 類型 | 位置 | 說明 |
|---|---|---|---|
| currency | String | Body | 貨幣 |
請求示例
POST /api/v1.0/invoke/open-ability/method/hotel-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_currency_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {}
}
成功返回示例
狀態碼:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"currency": "USD:US Dollar"
}
]
}
失敗返回示例
見 接口失敗返回